package com.spring.demo7;
/**
 * 切面(Aspect):Logging0 类所关注的具体行为
 * @author wdd-think
 *
 */
public class Logging0 {
	/** Following is the definition for a pointcut to select
	* all the methods available. So advice will be called
	* for all the methods.
	*/
	private void selectAll(){}
	/**
	* This is the method which I would like to execute
	* before a selected method execution.
	*/
	public void beforeAdvice(){
		System.out.println("Going to setup student profile.");
	}
	/**
	* This is the method which I would like to execute
	* after a selected method execution.
	*/
	public void afterAdvice(){
		System.out.println("Student profile has been setup.");
	}
	/**
	* This is the method which I would like to execute
	* when any method returns.
	*/
	public void afterReturningAdvice(Object retVal){
		System.out.println("Returning:" + retVal.toString() );
	}
	/**
	* This is the method which I would like to execute
	* if there is an exception raised by any method.
	*/
	public void AfterThrowingAdvice(IllegalArgumentException ex){
		System.out.println("There has been an exception: " + ex.toString());
	}
}
